<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false" %> 
<%@ taglib prefix="j" uri="/jodd" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>My JSP 'newStoreHouse.jsp' starting page</title>
<style type="text/css">
.pricing_table {  
	border:1px solid #c4cbcc;
	border-radius:4px;
	-moz-border-radius:4px;
	-webkit-border-radius:4px;
	outline:7px solid #f2f3f3;
	float:left;
}
.pricing_table ul { 
	list-style:none; 
	float:left; 
	width:147px; 
	height:475px;
	margin:0; 
	border:1px solid #f2f3f3;
	padding:5px;
	text-align:center;
	background-color:#FFF;
}
.pricing_table ul:hover { 
	-webkit-transform: scale(1.1);
  	-moz-transform: scale(1.1);
  	-o-transform: scale(1.1);
  	-moz-box-shadow:3px 5px 7px rgba(0,0,0,.7);
  	-webkit-box-shadow: 3px 5px 7px rgba(0,0,0,.7);
  	box-shadow:3px 5px 7px rgba(0,0,0,.7);
	cursor:pointer;
}
.pricing_table ul li {  
	border-bottom:1px dashed #cfd2d2;
	padding:10px 0;
	height:20px;
}
.pricing_table ul li:first-child { 
	font-size:18px;
	font-weight:bold;
}
.pricing_table ul li:nth-child(2) { 
	background:#fbfbfb;
}
.pricing_table ul li:nth-child(3) { 
	font-size:12px;
	font-weight:bold;
}
.pricing_table ul li:nth-child(n+4) { 
	font-size:14px;
}
.pricing_table ul li:last-child a { 
	border-radius:10px;
	-moz-border-radius:10px;
	-webkit-border-radius:10px;
	border:1px solid #c4cbcc;
	padding:10px;
	margin:5px 0;
	background: #e5e696; /* Old browsers */
	background: -moz-linear-gradient(top, #e5e696 0%, #d1d360 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e5e696), color-stop(100%,#d1d360)); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, #e5e696 0%,#d1d360 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, #e5e696 0%,#d1d360 100%); /* Opera11.10+ */
	background: -ms-linear-gradient(top, #e5e696 0%,#d1d360 100%); /* IE10+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e5e696', endColorstr='#d1d360',GradientType=0 ); /* IE6-9 */
	background: linear-gradient(top, #e5e696 0%,#d1d360 100%); /* W3C */
	color:#000;
	font-style:italic;
	display:block;
}
.pricing_table ul li.address{
height:70px;
}
.pricing_table ul.express{
   bottom: 237px;
    display: none;
    height: 180px;
    left: -5px;
    position: relative;
}
.pricing_table ul.express li{
 background: none repeat scroll 0 center #000000;
    color: #FFFFFF;
    height: 32px;
}
.pricing_table ul.express li a{
background: none repeat scroll 0 0 transparent;
    border: medium none;
    color: #FFFFFF;
    margin: 0;
    }
.show{
bottom: 26px;
    display: block;
    position: absolute;
    }
</style>
<script type="text/javascript" src="<%=basePath %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".buy_now").click(function(){
console.log("d");
var p=$(this).parent()
p.css({"position": "relative"})
var d=p.find("ul")
d.show().addClass("show");
return false;
});
$("ul.express a").click(function(){
var uul=$(this).parents("ul");
var tar=uul.find(".tid");

$.ajax({
                    type : "POST",
                    dataType : "html",
                    url: "<c:url value="./updateExpress/"/>",
                    data : {
                        id : tar.text(),
                        express : $(this).text()
                    },
                    success: function(html){
                    if(html=="success")
                    uul.hide("slow");
                    }
                });
return false;
});
});
</script>
  </head>
  
  <body>
<div class="pricing_table">
	<j:iter items="${storehouses }" var="sh">
<ul>
<li class="tid">${sh.tid }</li>
<li>${sh. buyerNick}</li>
<li> ${sh.receiverName}</li>
<li>${sh.receiverDistrict}</li>
<li>${sh.receiverCity}</li>
<li class="address">${sh.receiverAddress}</li>
<li> ${sh.sellerMemo}</li>
<li> <j:if test="${sh.hasBuyerMessage }"><img src="http://a.tbcdn.cn/sys/common/icon/trade/op_memo_0.png" alt=""/></j:if></li>
<li>${sh.tradeMemo}</li>
<li><a href="" class="buy_now">韵达</a>
<ul class="express">
<li><a href="">韵达</a></li>
<li><a href="">圆通</a></li>
<li><a href="">中通</a></li>
<li><a href="">申通</a></li></ul></li>
</ul>
</j:iter>
</div>
  </body>
</html>
